package com.bluedot.www.framework.ibatis.mybaits.io;

import java.io.IOException;
import java.io.InputStream;

/**
 * 配置获取
 *
 * @author GUOZHIPENG
 * @version 1.0
 * @date 2021/8/8 7:34
 */
public class Resources {
    public static InputStream getResourceAsStream(String resource) throws IOException {
        InputStream in = Resources.class.getClassLoader().getResourceAsStream(resource);
        if (in == null) {
            throw new IOException("Could not find resource :" + resource);
        }
        return in;
    }
}
